/******************************************************************************
 Copyright (c) 2021-22 Qualcomm Technologies International, Ltd.
 All Rights Reserved.
 Qualcomm Technologies International, Ltd. Confidential and Proprietary.

 DESCRIPTION
     Header file providing mapping for Synergy PBAP Client profile's public
     interfaces. Refer to csr_bt_pac_lib.h for APIs descriptions.
******************************************************************************/

#ifndef COMMON_SYNERGY_INC_PAC_LIB_H_
#define COMMON_SYNERGY_INC_PAC_LIB_H_

#include "synergy.h"
#include "csr_bt_pac_lib.h"

#define PAC_PRIM             (SYNERGY_EVENT_BASE + CSR_BT_PAC_PRIM)

#define PacConnectReqSend(_task,                                 \
                          _maxPacketSize,                        \
                          _destination,                          \
                          _windowSize)                           \
    CsrBtPacConnectReqSend(TrapToOxygenTask(_task),              \
                           _maxPacketSize,                       \
                           _destination,                         \
                           _windowSize)

#define PacDisconnectReqSend(_normal_disconnect)                 \
    CsrBtPacDisconnectReqSend(_normal_disconnect)

#define PacSetFolderReqSend(_folder)                             \
    CsrBtPacSetFolderReqSend(_folder)

#define PacAuthenticateResSend(_password,                        \
                               _passwordLength,                  \
                               _userId)                          \
    CsrBtPacAuthenticateResSend(_password,                       \
                                _passwordLength,                 \
                                _userId)

#define PacPullPbReqSend(_ucs2name,                              \
                         _src,                                   \
                         _filter,                                \
                         _format,                                \
                         _maxLstCnt,                             \
                         _listStartOffset,                       \
                         _resetNewMissedCalls,                   \
                         _vCardSelector,                         \
                         _vCardSelectorOperator,                 \
                         _srmpOn)                                \
    CsrBtPacPullPbReqSend(_ucs2name,                             \
                          _src,                                  \
                          _filter,                               \
                          _format,                               \
                          _maxLstCnt,                            \
                         _listStartOffset,                       \
                         _resetNewMissedCalls,                   \
                         _vCardSelector,                         \
                         _vCardSelectorOperator,                 \
                         _srmpOn)

#define PacPullVcardListReqSend(_ucs2name,                       \
                                _order,                          \
                                _searchVal,                      \
                                _searchAtt,                      \
                                _maxListCnt,                     \
                                _listStartOffset,                \
                                _resetNewMissedCalls,            \
                                _vCardSelector,                  \
                                _vCardSelectorOperator,          \
                                _srmpOn)                         \
    CsrBtPacPullVcardListReqSend(_ucs2name,                      \
                                 _order,                         \
                                 _searchVal,                     \
                                 _searchAtt,                     \
                                 _maxListCnt,                    \
                                 _listStartOffset,               \
                                 _resetNewMissedCalls,           \
                                 _vCardSelector,                 \
                                 _vCardSelectorOperator,         \
                                 _srmpOn)

#define PacPullVcardListResSend(_srmpOn)                         \
    CsrBtPacPullVcardListResSend(_srmpOn)

#define PacPullVcardEntryReqSend(_ucs2name,                      \
                                 _filter,                        \
                                 _format,                        \
                                 _srmpOn)                        \
    CsrBtPacPullVcardEntryReqSend(_ucs2name,                     \
                                  _filter,                       \
                                  _format,                       \
                                  _srmpOn)

#define PacPullVcardEntryResSend(_srmpOn)                        \
    CsrBtPacPullVcardEntryResSend(_srmpOn)

#define PacFreeUpstreamMessageContents(_msg)                     \
    CsrBtPacFreeUpstreamMessageContents(CSR_BT_PAC_PRIM, _msg)

#endif /* COMMON_SYNERGY_INC_PAC_LIB_H_ */
